<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>执法对象库管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnImport").click(function(){
				$.jBox($("#importBox").html(), {title:"导入数据", buttons:{"关闭":true}, 
					bottomText:"导入文件不能超过5M，仅允许导入“xls”或“xlsx”格式文件！"});
			});			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/zfdx/drZfdx/">执法对象库列表</a></li>
		<shiro:hasPermission name="zfdx:drZfdx:edit"><li><a href="${ctx}/zfdx/drZfdx/form">执法对象库添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="drZfdx" action="${ctx}/zfdx/drZfdx/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>对象名称：</label>
				<form:input path="dxmc" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li><label>执法种类：</label>
				<form:select path="fdsx" class="input-xlarge">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('sys_user_could')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>所属机构：</label>
				<sys:treeselect id="office" name="office.id" value="${drZfdx.office.id}" labelName="office.name" labelValue="${drZfdx.office.name}"
					title="所属机构" url="/sys/office/treeData?type=2" cssClass="input-medium" allowClear="true" notAllowSelectParent="false"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
            <input id="btnImport" class="btn btn-primary" type="button" value="导入"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>对象名称</th>
				<th>执法对象类别</th>
				<th>执法种类</th>
				<th>所属机构</th>
				<th>执法对象类型</th>
				<th>执法对象级别</th>
				<th>联系人</th>
				<th>联系电话</th>
				<shiro:hasPermission name="zfdx:drZfdx:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="drZfdx">
			<tr>
				<td><a href="${ctx}/zfdx/drZfdx/form?id=${drZfdx.id}">
					${drZfdx.dxmc}
				</a></td>
				<td>
					${fns:getDictLabel(drZfdx.dxlb, 'zfdx_type', '')}
				</td>
				<td>
					${fns:getDictLabel(drZfdx.fdsx, 'sys_user_could', '')}
				</td>
				<td>
					${drZfdx.office.name}
				</td>
				<td>
					${fns:getDictLabel(drZfdx.dxlx, 'zfdx_lx', '')}
				</td>
				<td>
					${fns:getDictLabel(drZfdx.dxjb, 'zfdx_jb', '')}
				</td>
				<td>
					${drZfdx.dxlxr}
				</td>
				<td>
					${drZfdx.dxlxdh}
				</td>
				<shiro:hasPermission name="zfdx:drZfdx:edit"><td>
    				<a href="${ctx}/zfdx/drZfdx/form?id=${drZfdx.id}">修改</a>
					<a href="${ctx}/zfdx/drZfdx/delete?id=${drZfdx.id}" onClick="return confirmx('确认要删除该执法对象库吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>